package com.ktgj.service.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.service.mapper.ContractTermsMapper;
import com.ktgj.service.domain.ContractTerms;
import com.ktgj.service.service.IContractTermsService;

/**
 * 合同商务条款			
Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-03
 */
@Service
public class ContractTermsServiceImpl implements IContractTermsService 
{
    @Autowired
    private ContractTermsMapper contractTermsMapper;

    /**
     * 查询合同商务条款			

     * 
     * @param contractTermsId 合同商务条款			
ID
     * @return 合同商务条款			

     */
    @Override
    public ContractTerms selectContractTermsById(Long contractTermsId)
    {
        return contractTermsMapper.selectContractTermsById(contractTermsId);
    }

    /**
     * 查询合同商务条款			
列表
     * 
     * @param contractTerms 合同商务条款			

     * @return 合同商务条款			

     */
    @Override
    public List<ContractTerms> selectContractTermsList(ContractTerms contractTerms)
    {
        return contractTermsMapper.selectContractTermsList(contractTerms);
    }

    /**
     * 新增合同商务条款			

     * 
     * @param contractTerms 合同商务条款			

     * @return 结果
     */
    @Override
    public int insertContractTerms(ContractTerms contractTerms)
    {
        contractTerms.setCreateTime(DateUtils.getNowDate());
        return contractTermsMapper.insertContractTerms(contractTerms);
    }

    /**
     * 修改合同商务条款			

     * 
     * @param contractTerms 合同商务条款			

     * @return 结果
     */
    @Override
    public int updateContractTerms(ContractTerms contractTerms)
    {
        contractTerms.setUpdateTime(DateUtils.getNowDate());
        return contractTermsMapper.updateContractTerms(contractTerms);
    }

    /**
     * 批量删除合同商务条款			

     * 
     * @param contractTermsIds 需要删除的合同商务条款			
ID
     * @return 结果
     */
    @Override
    public int deleteContractTermsByIds(Long[] contractTermsIds)
    {
        return contractTermsMapper.deleteContractTermsByIds(contractTermsIds);
    }

    /**
     * 删除合同商务条款			
信息
     * 
     * @param contractTermsId 合同商务条款			
ID
     * @return 结果
     */
    @Override
    public int deleteContractTermsById(Long contractTermsId)
    {
        return contractTermsMapper.deleteContractTermsById(contractTermsId);
    }
}
